// 文本扫光的效果
@mixin sharkText {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0.7),
      rgba(255, 255, 255, 0) 60%
    ) -100%/50% no-repeat currentColor;
  -webkit-background-clip: text;
  animation: shark-txt 2s infinite;
  @at-root {
    @keyframes shark-txt {
      to {
        background-position: 200%;
      }
    }
  }
}

// 实现元素扫光的效果
@mixin sharkWrap {
  &::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: linear-gradient(
      45deg,
      rgba(255, 255, 255, 0) 40%,
      rgba(255, 255, 255, 0.7),
      rgba(255, 255, 255, 0) 60%
    );
    animation: shark-wrap 2s infinite;
    transform: translateX(-100%);
  }
  @at-root {
    @keyframes shark-wrap {
      to {
        transform: translateX(100%);
      }
    }
  }
}
